<template>
  <div class="box">
    {{ money }}
    <button @click="btn">修改money</button>
  </div>
</template>

<script>
export default {
  props: {
    money: {
      type: Number,
      required: true
    }
  },
  methods: {
    btn () {
      this.$emit('update:money', this.money + 1)
    }
  }
}
</script>

<style>
.box {
  width: 300px;
  height: 300px;
  background-color: #957e7e;
}
</style>
